package com.davidk.survey.server.data;

import java.util.List;

import com.davidk.survey.server.model.Survey;

public class SurveyDAO extends BaseDAO<Survey>  {

	public SurveyDAO() {
		super(Survey.class.getName());
	}

	public Survey fetch(long id) {
		List<Survey> ret = getByKey(Survey.class.getName(), "id", id);
		if (ret != null && ret.size() > 0) {
			return (Survey) ret.get(0);
		}
		return null;
	}

	public List<Survey> list() {
		return list();
	}

	public void save(Survey ques) throws DataStoreException {
		saveObj(ques);
	}
}
